package com.str.BT;
public class BTNodeTest {

  public static void print(BTNode ref, int level) {
    if (ref == null) return;
    print(ref.right, level+1);
    for (int i=0; i<level; i++)
      System.out.print("    ");
    System.out.println(ref.data);
    print(ref.left, level+1);
  }

  public static void main(String[] args) {	
	BTNode root, temp1, temp2;
	temp1 = new BTNode("B", null, new BTNode("D"));
	temp2 = new BTNode("F", new BTNode("G"), null);
	temp2 = new BTNode("C", new BTNode("E"), temp2);
	root = new BTNode("A", temp1, temp2);
	print(root, 0);
  }
}	